<?php
class generalActions extends sfActions
{	
	
  public function executeIndex(sfWebRequest $request)
  {
  	$this->setTemplate('homepage');
  	//$q = Doctrine_Query::create()->from('Carte c')->where('c.expires_at > ?',date('Y-m-d H:i:s', time()));
  	//$this->jobs = $q->execute();
  }
 
  public function executeBrowse(sfWebRequest $request)
  {
  	$this->$carti = Doctrine_Core::getTable('Carte')->createQuery('a')->execute();
  	$this->setTemplate('Browse');
  }
  
  public function executeSearch(sfWebRequest $request)
  {
  	$this->setTemplate('Search');
  }
  
  public function executeAutentificate(sfWebRequest $request)
  {
  	$this->setTemplate('Autentificate');
  }
  
  public function executeContact(sfWebRequest $request)
  {
  	$this->setTemplate('Contact');
  }
  
protected function processForm(sfWebRequest $request, sfForm $form)
  {
    $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));
    if ($form->isValid())
    {
      //$carte = $form->save();

      //$this->redirect('carte/edit?id_carte='.$carte->getIdCarte());
    }
  }
}